//
//  BusinessManagerStore.m
//  NewPro
//
//  Created by 何荧红 on 2019/5/5.
//  Copyright © 2019 何荧红. All rights reserved.
//

#import "BusinessManagerStore.h"

@implementation BusinessManagerStore

#pragma mark 划拨POS
- (void)PostPOSFlowWithPrams:(NSDictionary *)prams Success:(void(^)(NSDictionary *res))success Failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@/api/pos/flow",IP];
    [HttpTool postUrlWithString:url parameters:prams success:^(id responseObject) {
        NSError *erro = [HttpTool inspectError:responseObject];
        if (erro == nil) {
            success(responseObject);
        }else{
            failure(erro);
        }
    } failure:^(NSError *error) {
        failure(error);
    }];
}

#pragma mark 激活MPOS
- (void)PostAddMPOSWithPrams:(NSDictionary *)prams Success:(void(^)(NSDictionary *res))success Failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@/api/merchant/addMPOS",IP];
    [HttpTool postUrlWithString:url parameters:prams success:^(id responseObject) {
        NSError *erro = [HttpTool inspectError:responseObject];
        if (erro == nil) {
            success(responseObject);
        }else{
            failure(erro);
        }
    } failure:^(NSError *error) {
        failure(error);
    }];
}

#pragma mark 激活POS
- (void)PostAddPOSWithPrams:(NSDictionary *)prams Success:(void(^)(NSDictionary *res))success Failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@/api/merchant/addPOS1",IP];
    [HttpTool postUrlWithString:url parameters:prams success:^(id responseObject) {
        NSError *erro = [HttpTool inspectError:responseObject];
        if (erro == nil) {
            success(responseObject);
        }else{
            failure(erro);
        }
    } failure:^(NSError *error) {
        failure(error);
    }];
}




@end
